//
//  JCTopic.h
//  PSCollectionViewDemo
//
//  Created by jc on 14-1-7.
//
//

#import <UIKit/UIKit.h>
#import "NewsRecoImageObj.h"

@protocol JCTopicDelegate<NSObject>
-(void)didClick:(id)data andView:(UIView *)view;
-(void)currentPage:(int)page total:(NSUInteger)total;
@end

/**
 *  循环滚动是否需要定时器来自动滚动
 */
typedef NS_ENUM(NSUInteger,scrollStyle) {
    /**
     *  不需要
     */
    scrollStyleNone,
    /**
     *  需要定时器来自动滚动
     */
    scrollStyleAuto,
};

//typedef NS_ENUM(NSUInteger,sourceType) {
//
//    sourceTypeBuildDetail,//小区跟房源 图片比例大小不一样
//    sourceTypeXQDetail,
//};
@interface JCTopic : UIScrollView<UIScrollViewDelegate>{
    UIButton * pic;
    bool flag;
    int scrollTopicFlag;
    NSTimer * scrollTimer;
    int currentPage;
    CGSize imageSize;
    UIImage *image;
}
@property(nonatomic,strong)NSArray * pics;
@property(nonatomic,retain)id<JCTopicDelegate> JCdelegate;
@property(nonatomic,assign)scrollStyle style;
//@property(nonatomic,assign)sourceType sourcetype;
@property(nonatomic,assign)CGFloat scrollSecond;//滚动的定时器的时间
@property(nonatomic,strong)NSMutableArray *viewArray;
-(void)releaseTimer;
-(void)upDate;
-(void)setSelf;
@end
